package com.sundroid.utils.common;

import java.io.IOException;
import java.util.Properties;

public class PropertiesUtils {

	static Properties prop = new Properties();


	public static boolean loadFile(String fileName) {
		try {
			prop.load(PropertiesUtils.class.getClassLoader()
					.getResourceAsStream(fileName));
		} catch (IOException e) {
			e.printStackTrace();
			return false;
		}
		return true;
	}
	
	


	public static String getPropertyValue(String key) {
		return prop.getProperty(key);
	}
	public static void main(String[] args) {
		PropertiesUtils.loadFile("jdbc.properties");
		String URL = PropertiesUtils.getPropertyValue("url");
		System.out.println(URL);

	}

}